from django.conf import settings
from django.conf.urls.defaults import *
from django.views.generic.list_detail import object_detail as detail_view
from django.views.generic.simple import redirect_to
from pyplog.pages.models import Page

pages = Page.objects.all()

urlpatterns = patterns("",
	(r"^$", redirect_to, { "url" : "/" }),
	url(
		r"^(?P<slug>.*)$",
		detail_view,
		{
			"queryset" : pages,
			"template_name" : "pages/page_detail.html",
			"template_object_name" : "page",
		},
		name = "page-detail",
	),
)
